<?php
$T->loadTpl("./html/".$template."/".$qname.".html");
$T->SetTpl('cssjs','html/cssjs.inc'); 
$T->SetTpl('jsmodel','html/jsmodel.inc');     
  
$sname=isset($_GET['sname'])?$_GET['sname']:"";
$where = "";
if(!empty($sname)){
    $where .= " and truename like '%".$sname."%' ";
}
$T->SetBlock2("list","SELECT id,deptname FROM sys_department order by odx asc"
    ,array(array("block"=>"rp","pid"=>"id","sql"=>"select id,truename from sys_member where department=? ".$where." order by inserttime")));
        
$T->Set("template",$template);         
$T->clearNaN();       
$T->clearNoN();
$T->display(); 